home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
editor
/
cedrexx.lha
/
cedrexx_scripts
/
UsenetStrip.ced
< prev
Wrap
Text File
|
1996-05-07
|
2KB
|
81 lines
/************************************************************\
** $VER: UsenetStrip 1.0 **
** By : James Allen (AKA $LiNg$HoT) **
** Date: September 94 **
** Rel : May 96. **
** Description : **
** **
** - Strips certain lines from a Usenet/E-Mail header. **
** - Edit the names array and add/remove keywords. **
** - If found somewhere on the line, the whole line goes. **
** - Press a key to abort at any time. **
** - IMPORTANT: Place a '##' at the end of the header! **
** Otherwise the strip will not stop! **
** **
\************************************************************/
address 'rexx_ced'
OPTIONS RESULTS
BEG OF FILE
CEDTOFRONT
call SetArray
Do until left(Line,2) = '##'
STATUS LINEBUFFER
Line = left(RESULT,13)
Delete = CheckField(Line)
If Delete = 1 | POS(':',Line) = 0 & left(Line,2) ~= '##' then
'DELETE LINE'
Else
DOWN
LASTKEY
/* Check for a keystroke (~= -1) which is not an key release (< 128) */
IF (RESULT ~= -1) & (WORD( RESULT, 1 ) < 128) THEN DO
CEDTOFRONT
OKAY1 "UseNet Strip Aborted!"
EXIT
END
End
CheckField:
parse arg Line
do i=1 to names.0
If POS(names.i,Line) ~= 0 then Return 1
End
Return 0
SetArray:
/* Any word in the array found in the header will result in the line
being deleted. Add or remove keywords to the following, incrementing/
decrementing as you do so. */
names.0 = 19
names.1 = "Path"
names.2 = "To"
names.3 = "Received"
names.4 = "Message"
names.5 = "Error"
names.6 = "Reply"
names.7 = "Originator"
names.8 = "Sender"
names.9 = "Precedence"
names.10 = "X-List"
names.11 = "Organization"
names.12 = "Lines"
names.13 = "Status"
names.14 = "References"
names.15 = "Xref"
names.16 = "Distribution"
names.17 = "X-Newsreader"
names.18 = "Keywords"
names.19 = "Summary"
names.20 = "Mime-Version"
names.21 = Content-Type"
Return